/**
 * 卡片配置
 * 字典管理 dict-manage
 */
const cardConfig = {
  'dict-manage': {
    cardType: 'TableCard',
    cardData: {},
    dataType: 'table',
    notInitData: true,
    moduleBtnList: [
      {
        label: '新增',
        type: 'primary',
        icon: 'el-icon-plus',
        id: 'dict-manage-add',
        authId: 'grass-core:dict:add',
        needTreeNode: true
      },
      // {
      //   label: '导出',
      //   icon: 'el-icon-download',
      //   id: 'dict-manage-download',
      //   downType: 'downloadFile',
      //   downPath: '/energy-carbon/grass-core/dict/export'
      // },
      {
        label: '批量删除',
        type: 'danger',
        plain: true,
        icon: 'el-icon-delete',
        id: 'dict-manage-deleteBatch',
        authId: 'grass-core:dict:batchDelete'
      }
    ],
    mainClass: 'main-padding20',
    paginationParams: { page: 1, limit: 10 },
    path: 'dictManage.getDictList',
    isMultiple: true,
    id: 'dict-manage'
  }
}

const treeConfig = {
  'dict-manage': {
    // title: '选择字典',
    inputStyle: { 'padding-top': '20px' },
    inputConfig: {
      placeholder: '字典名称'
    },
    dataResolveConfig: {
      id: 'id',
      parentId: 'parentId',
      dataType: 'object',
      keyProp: 'records'
    },
    attrConfig: {
      'node-key': 'id',
      props: {
        children: 'children',
        label: 'name'
      }
    },
    btnList: [
      {
        label: '新增',
        type: 'primary',
        icon: 'el-icon-plus',
        id: 'dict-operate-add',
        authId: 'grass-core:dict:add'
      },
      {
        label: '编辑',
        icon: 'el-icon-edit',
        id: 'dict-operate-edit',
        authId: 'grass-core:dict:update'
      },
      {
        label: '删除',
        type: 'danger',
        icon: 'el-icon-delete',
        id: 'dict-delete',
        authId: 'grass-core:dict:deleteById'
      }
    ],
    isExpandBtnList: true,
    path: 'dictManage.getDictModuleList',
    defaultExpandAll: true,
    id: 'dict-manage-tree'
  }
}

export default {}
export { cardConfig, treeConfig }
